package pac;

import java.io.File;

public class dedede {
    public static void main(String[] args) {
        File file = new File("D://a");
        method(file);
    }

    private static void method(File file) {
        File[] files = file.listFiles();
        for (File f : files) {
            if (f.isFile()){
                f.delete();
            }else {
                method(f);
            }
        }
        file.delete();

    }
}
